<?php

namespace App\Domain\HealthCheck\Requests;

use Illuminate\Foundation\Http\FormRequest;

class saveMeasureDataPost extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'memberUid' => 'required|string',
            'type' => 'required|string',
            'item' => 'required|string',
            'value0' => 'nullable',
            'value1' => 'nullable',
            'value2' => 'nullable',
        ];
    }

    public function messages()
    {
        return [
            'memberUid.required' => '1',
            'type.required' => '2',
            'item.required' => '3',
        ];
    }
}
